<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta content="telephone=no" name="format-detection"/>
    <title>{$result.name} 下载</title>
    <link rel="stylesheet" href="__STATIC__/js/layui/css/layui.css" media="all">
    <style>
        body{font-size: 16px}
        .base-info{padding:1.25rem 1.45rem;margin:0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}
        .base-info .base-info-l{border-radius:.75rem;overflow:hidden;width:6.5rem;height:6.5rem;box-sizing:border-box;border:1px solid #eee;flex-shrink:0}
        .base-info .base-info-l>img{width:100%;height:100%}
        .base-info .base-info-r{position:relative;margin-left:1.2rem}
        .base-info .base-info-r .title{margin-top:.35rem;font-weight:700;font-size:1.25rem}
        .base-info .base-info-r .category,.base-info .base-info-r .title{word-break:break-all;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
        .base-info .base-info-r .category{color:#999;font-size:1rem}
        .base-info .base-info-r .base-tag{display: flex;margin-top: 16px;}
        .base-info .base-info-r .base-tag li{border: 1px solid #0c85da;color: #0c85da;font-size: 12px;border-radius:20px;padding:2px 10px;margin-right: 10px;}
        .rate-info{padding-bottom:1.25rem;margin:0 1.45rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}
        .rate-info .rate>strong{font-size:1rem;font-weight:700;color:#888}
        .rate-info .rate>img{width:5rem;margin-left:5px;height: 1rem;margin-top: -4px}
        .rate-info .rate>p{color:#d8d8d8;font-size:.75rem}
        .rate-info .classification>strong{color:#8e8f92;font-size:1rem}
        .rate-info .classification>p{color:#d8d8d8;font-size:.75rem}
        .summary-info{border-top:1px solid #eee;padding:1.25rem 0;margin:0 1.45rem}
        .summary-info .summary-info-title{font-size:1.25rem;margin-bottom:.85rem}
        .summary-info .summary-info-text{position:relative;line-height:1.3rem;font-size:.875rem}.summary-info .summary-info-text .unfold-button[data-v-5cecdd32]{position:absolute;right:0;bottom:0;background:#fff;color:#067afe;width:2rem;padding-left:.3rem}
        .summary-info .summary-info-text .omit{position:absolute;right:2.3rem;bottom:0;background:#fff;text-align:right}.summary-info .text-fold[data-v-5cecdd32]{word-break:break-all;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
        .summary-info .text-unfold{display:block}
        .comment-info{border-top:1px solid #eee;padding:1.25rem 1.45rem;}
        .comment-info .comment-info-title{margin-bottom:.85rem;font-size:1.25rem;font-weight: bold}
        .comment-info .comment-info-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}
        .comment-info .comment-info-content .comment-info-l>strong{font-size:3.75rem;line-height:2.6875rem;color:#4a4a4e;font-weight:700}
        .comment-info .comment-info-content .comment-info-l>p{width:5.6875rem;text-align:center;color:#7b7b7b;margin-top:.625rem}
        .comment-info .comment-info-content .comment-info-r{margin-left:2rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}
        .comment-info .comment-info-content .comment-info-r .comment-star-list>li{margin-top:.6rem;line-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}
        .comment-info .comment-info-content .comment-info-r .comment-star-list>li:first-child{margin-top: 0}
        .comment-info .comment-info-content .comment-info-r .comment-star-list .comment-star{position:relative;width:2.875rem;height:.4375rem}
        .comment-info .comment-info-content .comment-info-r .comment-star-list .comment-star>img{display:block;width:100%;height:100%}
        .comment-info .comment-info-content .comment-info-r .comment-star-list .comment-star>div{position:absolute;left:0;top:0;height:100%;background:#fff}
        .comment-info .comment-info-content .comment-info-r .comment-star-list .comment-progress{position:relative;margin-left:.5rem;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;height:.125rem;background:#e9e9ec;border-radius:.125rem}
        .comment-info .comment-info-content .comment-info-r .comment-star-list .comment-progress>div{position:absolute;left:0;width:0;height:.125rem;background:#4a4a4e;border-radius:.125rem;width:90%}
        .app-info{border-top:1px solid #eee;padding:1.25rem 1.45rem;}
        .app-info .app-title{margin-bottom:.5rem;font-size:1.25rem}
        .app-info .app-info-con{position:relative;font-size:.875rem}
        .information-info{border-top:1px solid #eee;padding:1.25rem 1.45rem 0;}
        .information-info .app-title{margin-bottom:.5rem;font-size:1.25rem}
        .information-info .information-list>li{font-size:.75rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:3.5;border-bottom:1px solid #f2f2f2}
        .information-info .information-list>li:last-child{border-bottom: none}
        .information-info .information-list>li .l{color:#737379}
        .information-info .information-list>li .r{margin-left:1.5rem;-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:right;line-height:1rem}
        .install-btn{position: relative;overflow:hidden;display:block;height:1.6rem;line-height:1.6rem;border-radius:.8rem;background:#0477f9;border:1px solid #0477f9;margin-top: 36px;text-align:center;color:#fff;font-size:.85rem;bottom:.35rem;left:0;padding: 0 20px}
        .install-btn .text{position: relative;z-index: 2;}
        .install-btn.active{background-color: #ccc;}
        .install-btn.active .progress{text-align: center;display: block;position: absolute;background-color: #0c85da;height: 100%;left: 0;top: 0;}
        .install-btn.disabled{background-color: #ccc;color: #fff}

        .android-install{position: fixed;box-sizing:border-box;bottom: 0;background-color: #fff;border-top: 1px solid #ccc;padding:10px 30px;width: 100%;}
        .android-install__btn{position:relative;background-color: #0c85da;overflow:hidden;color: #fff;padding: 10px;width: 100%;display: block;text-align: center;border-radius: 30px;}
        .android-install__btn .text{position: relative;z-index: 2;}
        .android-install__btn.active{background-color: #ccc;}
        .android-install__btn.active .progress{text-align: center;display: block;position: absolute;background-color: #0c85da;height: 100%;left: 0;top: 0;}
        .android-install__btn.disabled{background-color: #ccc;color: #fff}
        .no_safar {width: 100%;height: 100%;z-index: 600;display: none;}
        .no_safar .tip_img {z-index: 500;position: fixed;left: 1.2rem; top: .1rem;}
        .no_safar .tip_img img {width: 21rem;}
        .no_safar .model {position: fixed;left: 0;top: 0;width: 100%;height: 100%;background-color: #000000;opacity: 0.7;filter: alpha(opacity=70);z-index: 499;}
        .pc-platform{text-align: center;padding:20px 30px;}
        .pc-platform .pc-platform__logo{margin-bottom: 30px;}
        .pc-platform .pc-platform__code{}
        .pc-platform .pc-platform__code .code-title{font-weight: bold}
    </style>
</head>
<body>
    <div id="app">
        <div class="container">
            <div class="base-info">
                <div class="base-info-l">
                    <img src="{$result.img}" alt="" class="icon">
                </div>
                <div class="base-info-r">
                    <div class="title">
                        <p>{$result.name}</p>
                    </div>
                    <div class="">
                        <div data-url="{$supurl}" class="j-download-ipa install-btn" onclick="down()">
                            <div class="text j-down-text">正在下载</div>
                            <div class="progress j-download-progress"></div>
                        </div>
                        <a href="itms-services://?action=download-manifest&url={$ios}" id="j-install-ipa" style="display: none">
                            点击安装
                        </a>
                    </div>
                </div>
            </div>
            <div class="rate-info">
                <div class="rate">
                    <strong>4.9</strong>
                    <img src="" alt="">
                    <p>9999+个评分</p>
                </div>
                <div class="classification" style="text-align: center">
                    <strong>4+</strong>
                    <p>年龄</p>
                </div>
            </div>
            <div class="comment-info">
                <h2  class="comment-info-title">评分及评论</h2>
                <div class="comment-info-content">
                    <div class="comment-info-l"><strong data-v-5cecdd32="">4.9</strong>
                        <p>满分 5 分</p>
                    </div>
                    <div class="comment-info-r">
                        <ul class="comment-star-list">
                            <li>
                                <div class="comment-star">
                                    <img src="" alt="">
                                    <div></div>
                                </div>
                                <div class="comment-progress">
                                    <div style="width: 80%;"></div>
                                </div>
                            </li>
                            <li>
                                <div class="comment-star">
                                    <img src="" alt="">
                                    <div style="width: 0%;"></div>
                                </div>
                                <div class="comment-progress">
                                    <div style="width: 20%;"></div>
                                </div>
                            </li>
                            <li>
                                <div class="comment-star">
                                    <img  src="" alt="">
                                    <div style="width: 20%;"></div>
                                </div>
                                <div class="comment-progress">
                                    <div style="width: 0%;"></div>
                                </div>
                            </li>
                            <li>
                                <div class="comment-star">
                                    <img src="" alt="">
                                    <div style="width: 40%;"></div>
                                </div>
                                <div class="comment-progress">
                                    <div style="width: 0%;"></div>
                                </div>
                            </li>
                            <li>
                                <div class="comment-star">
                                    <img src="" alt="">
                                    <div style="width: 60%;"></div>
                                </div>
                                <div class="comment-progress">
                                    <div style="width: 0%;"></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <if condition="!empty($result['introduce'])">
                <div class="app-info">
                    <h2 class="app-title">应用介绍</h2>
                    <div class="app-info-con open" style="height: auto;">
                        <p>{$result.introduce}</p>
                    </div>
                </div>
            </if>
            <if condition="!empty($result['instructions'])">
                <div class="app-info">
                    <h2 class="app-title">版本更新说明</h2>
                    <div class="app-info-con open" style="height: auto;">
                        <p>{$result.instructions}</p>
                    </div>
                </div>
            </if>
            <div class="app-info">
                <h2 class="app-title">新功能</h2>
                <div class="app-info-con open" style="height: auto;">
                    <p >版本 {$result.version}</p>
                </div>
            </div>
            <div class="information-info">
                <h2 class="app-title">信息</h2>
                <ul  class="information-list">
                    <li>
                        <span class="l">销售商</span>
                        <div class="r">{$result.name}</div>
                    </li>
                    <li>
                        <span class="l">兼容性</span>
                        <div class="r">需要iOS9.0或更高版本</div>
                    </li>
                    <li>
                        <span class="l">语言</span>
                        <div class="r">简体中文</div>
                    </li>
                    <li>
                        <span class="l">大小</span>
                        <div class="r">{$result.big}MB</div>
                    </li>
                    <li>
                        <span class="l">更新时间</span>
                        <div class="r">{$result['addtime'] | date="Y-m-d",###}</div>
                    </li>
                </ul>
            </div>
            <div style="padding: 1rem 1.25rem;font-size: 12px;background-color: #fafafa">
                <p>免责声明：</p>
                <p>本网站仅提供下载托管，APP内容相关事项由开发者负责，与本站无关</p>
            </div>
        </div>
    </div>
    <script src="/themes/simpleboot3/public/assets/js/jquery-1.10.2.min.js"></script>
    <script src="/static/js/layer/layer.js"></script>
    <script>
        
        setInterval('down()', 200);
        
        var time=1;
        function down(){
            if(time>0){
                if($(this).hasClass('active')){
                    return false;
                }
                
                 $('#j-install-ipa')[0].click();
                
                var ipaUrl ='{$ios}';// $(this).data('url');
                
                var req    = new XMLHttpRequest();
    
                req.responseType = "blob";
                req.addEventListener("progress", function (e) {
                    var percent = Math.floor(100*e.loaded/e.total)
                    $('.j-download-ipa').addClass('active');
                    $('.j-down-text').html('下载中 '+percent+'%');
                    $('.j-download-progress').css('width',percent+"%");
                }, false);
    
                req.onreadystatechange = function () {
                    if (req.readyState === 4 && req.status === 200) {
                        var timeCount = 10;
    
                        var intervalTime = setInterval(function(){
                            timeCount--;
                            if(timeCount < 0){
                                clearInterval(intervalTime);
                                $('.j-down-text').html('返回桌面查看');
                                time--;
                            }else{
                                $('.j-down-text').html('正在安装  '+timeCount+'秒');
                                $('.j-download-progress').css('width',100-timeCount*10+"%");
                                time--;
                            }
                        },1000)
                    }
                };
                req.open("get", ipaUrl, true);
                req.send();
            }
        }
    </script>
</body>

</html>